#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;

void solve()
{
    int n; cin >> n;
    vector<int> ans(2 * n);
    set<int> cur; cur.insert(1);
    for (int i = 1; i < 2 * n; ++i)
    {
        cout << "? ";
        cout << 1 + cur.size() << ' ';
        for (auto& e : cur) cout << e << ' ';
        cout << i + 1 << endl;
        cout.flush();
        int rep; cin >> rep;
        if (rep == 0) cur.insert(i + 1);
        else ans[i] = rep;
    }
    set<int> other;
    for (int i = 0; i < 2 * n; ++i)
        if (cur.count(i + 1) == 0) other.insert(i + 1);
    for (int i = 0; i < 2 * n; ++i)
    {
        if (other.count(i + 1)) continue;
        cout << "? ";
        cout << 1 + other.size() << ' ';
        for (auto& e : other) cout << e << ' ';
        cout << i + 1 << endl;
        cout.flush();
        int rep; cin >> rep;
        ans[i] = rep;
    }
    cout << "! ";
    for (auto& e : ans) cout << e << ' '; cout << endl;
}

int main()
{
    int t; cin >> t;
    while (t--) solve();
    return 0;
}

//1 1 2 2